Welcome to Solarduino , A blog about DIY Solar PV and Arduino projects

How to send hundred of values to Blynk App without disconnection problem

Arduino Starter Kit

It is a complete set which include most of the components you need to start Arduino Projects. Kindly support us by grabbing one set at our affiliate link here !!!

Blynk is a user friendly platform that provide web interface for remote data display & monitoring. It provides smart phone app for easy setup and values display. In the app, there are a lot of Widget Boxes which suits a lot of display method for measurement data. However, if you want to use the Widgets, it will consume energies based on the Widget types, similar to online games that you may need to top up the energy when you require more widgets. Upon creating an account, there will be some energy which should be sufficient for small project.

When you are getting more and more familiar with Blynk, you may slowly adding more and more sensors to it. You may come into a problem where uploading values are congested. It will lead to Blynk server reject and you will always have disconnection problem. Thus this blog page will discuss in detail why this issue happens and provide you a proper guide how you should program your codes. Once you understand in depth, you can even upload more than 100 values every time without any issue. 

NodeMCU micro-controller

The NodeMCU micro-controller is similar to Arduino micro-controller board. It is compatible with Arduino IDE software and is built-in with the ESP8266 module which can be connected to the internet. You can grab some at our affiliate link here !!!  

Node MCU Micro controller Base

The based below the Node MCU can provide more flexibility on the connection ports to support more sensors. Besides, it also has 12V input port and able to provide 5V power supply to support the sensors. Support us by purchase it from our affiliate link here !!!

Everything has its limitation including the Blynk Server. We cannot upload so many sensor values in a very short time. For example, you cannot upload 100 values every second. Blynk Server is a web interface service provider and they are providing their services worldwide. It will get congested if everybody is doing so. Besides, during uploading, the Blynk server requires time for verification thus uploading speed faster than the verification time may cause error leading Blynk server rejects the values. Typically every 10 values of upload requires 1 second of pending time. For example, if you would like to upload 100 values to the Blynk Server, you need to provide a pending time of about 10 seconds before it can be uploaded again.

The second main factor that cause disconnection problem may be due to programming congestion. On their official web-page, they urged public to use Blynk Timer function and avoid all programming codes written inside Void Loop function. It requires constant connectivity and active to their Blynk Server. Any other running programming codes during Blynk connectivity or values uploading will cause connection lost. Thus it is advisable that calculation and uploading programming are done by sequence. For example, we should stop measurement or calculation values during values are uploading to the Blynk Server or the other way round.  

Wireless Smart Energy Monitor for Saving

This is an energy meter for the whole household monitoring and the measurement unit is fit inside electrical panel while there is a portable monitor display which is constantly communicate and acquire data via wireless with the measurement transmitter unit. You can get it at our affiliate link here !!!

Wi-Fi Smart Energy Monitoring Control Meter

This is a smart household energy meter that could monitor and controlled by phone anywhere around the world at anytime. This is for single phase household and installed in electric panel via din rail. Get it at our affiliate link here !!!

In this example, we will use 1 potentiometer as a sensor reading to come out with 100 different measurement or calculation values. They will be divided into 5 major groups. Each group will have 20 variable values measured at different time duration. Group 1 will be taking reading every 1 milli second and get the average value after 500 values; Group 2 will be taking reading every 5 milli second and get the average value after 100 values; Group 3 will be taking reading every 10 milli second and get the average value after 50 values; Group 4 will be taking reading every 100 milli second and get the average value after 5 values while Group 5 will be taking reading every 500 milli second. 

All the calculation will be stopped after average readings are taken typically after 500 milli second. After the 500 milli second, all calculation will be stopped and at standby status. When the uploading function is activated (probably every 10 seconds), the 100 values will be uploaded to the Blynk server. You will realize it might take around 7-8 seconds to successfully  upload all the values. After the last value is updated at the Blynk App, it will initiate the next cycle of measurement and calculation again. With this sequence method, sufficient time is given for separate task and the codes are by proper sequence thus no disconnection issue occurs.

100Wp Solar Panels

100Wp 18Vmp Solar Panel is commonly used for Solar DC direct and small Solar Off-Grid PV System. A good solar panel may last at least 20 years. Grab one at our affiliate link here !!!

DC Energy Meter

DC Energy meter display important measurement units such as voltage, current, power and energy. It is very useful to troubleshoot or analyse an electrical or project performance. Grab one at our affiliate link here !!! 

Wiring connection is very simple. We just need 1 NodeMCU micro controller and a potentiometer typically 10k to 50k ohm. Left pin of potentiometer is powered by 3.3V power supply while Right pin is connected to ground. The middle pin will be connected to the A0 Analog Pin of the NodeMCU.

There are 2 codes attached at the bottom of the page. Both Arduino codes using the sequence and pending time guideline resulting the same output result. The first code file is using separate Blynk Timer for all the values calculation while the second code file is using typical calculation codes all works inside Void Loop. It is just to prove and show you that calculation codes can be put everywhere including the Void Loop without any issues as long as program codes are working in sequence without overlapping while providing sufficient pending time for values uploading to the Blynk Server.

MPPT Solar Charge Controller

MPPT Solar Charge Controller is a regulator that protect battery while charging and discharging. It also maximize the power generation of the Solar Panel. Kindly support us by getting at our affiliate link here !!!

Before we end, we would like to give gratitude to you for taking the time to read the post. We would need readers like you to support us in order to keep growing. You can support us in the following ways :

Donate & Fund Raising

If you like my work, please send me a donation to encourage me to do more. Thanks

Aliexpress Affiliate

We are the member of Aliexpress affiliate marketing. Do support us by clicking the affiliate product links if you do wish to purchase them.

Like and Share

If you like our post, we need your support to like and share our posts or videos so that it can reach more and more people like you !!

100 Values to Blynk using Blynk Timer.ino
100 Values to Blynk programmed in Void Loop.ino